package com.songcha.module_main.ui.fragment.achievement

import android.app.Application
import com.songcha.library_base.interfaces.IApiResult
import com.songcha.library_base.mvvm.base.BaseViewModel
import com.songcha.module_memo.bean.wooden_fish.QmyMedalBean
import kotlinx.coroutines.flow.MutableStateFlow

class AchievementViewModel(app:Application):BaseViewModel<AchieveRepository>(app) {
    val medalBean = MutableStateFlow<QmyMedalBean.DataBean?>(null)

    fun getMyQmyMedalList(){
        handleApiDataObserver(repository.getMyQmyMedalList(),object: IApiResult<QmyMedalBean> {
            override fun onSuccess(bean: QmyMedalBean) {
                medalBean.value = bean.data
            }

        },true)
    }
}